package ar.com.ctrln.view.dashboard.calendar;

import org.zkoss.zk.ui.Component;

import org.zkoss.zk.ui.select.annotation.VariableResolver;
import org.zkoss.zk.ui.select.annotation.Wire;
import org.zkoss.zk.ui.select.annotation.WireVariable;
import org.zkoss.zul.ListModelList;
import org.zkoss.zul.Listbox;
import org.zkoss.zul.Window;

import ar.com.ctrln.control.calendar.ConsultarEventos;
import ar.com.ctrln.persistence.model.evento.EventoCalendario;
import ar.com.ctrln.view.ui.comportamientoVentana.AbstractMinimizarVentana;

@VariableResolver(org.zkoss.zkplus.spring.DelegatingVariableResolver.class)
public class ConsultarEventosController extends AbstractMinimizarVentana {

	private static final long serialVersionUID = -4083889746718217571L;

	@WireVariable
	private ConsultarEventos consultarEventos;
	@Wire
	private Window wConsultarEvento;

	@Wire
	private Listbox lbEventos;

	@Override
	public void doAfterCompose(Component comp) throws Exception {
		super.doAfterCompose(comp);

		lbEventos.setModel(new ListModelList<EventoCalendario>(consultarEventos
				.listar()));

	}

}
